home *** CD-ROM | disk | FTP | other *** search
-
- Get_Pixel_Value
-
-
- This is a Procedure for Personal Pascal that allows you
- to check the value of a given Pixel. Even though the code is
- Personal Pascal, it shouldn't be too hard to convert it to
- other languages.
-
-
- Included in this archive are :
-
-
- GETPIXEL.DOC - This file
- GETPIXEL.PAS - The subroutine - Use as an Include file
- TEST.PAS - Source code for example program
- TEST.PRG - Compiled version of example program
-
- To use GETPIXEL, The call is as follows:
-
-
- Get_Pixel_Value( X,Y, PixelValue, ColorIndex ) ;
-
- Here X and Y are the X and Y coordinates of the pixel
- you want to check. PixelValue and ColorIndex are return
- values giving you the state of the pixel. Both of these refer
- to the color of the pixel. All four of these parameters are
- Short_Integer Values. If you are using Personal Pascal
- version one, just change 'Short_Integer' to 'Integer' and the
- procedure will work just fine - also I suggest that you
- upgrade to version 2 if you plan to keep using Personal
- Pascal as there are many extensions that you will not be able
- to use otherwise.
-
- Following are Color Index and Pixel Value tables for the 2
- color resolutions - I haven't used it for monochrome so I
- can't tell you what they are however I'm sure that the
- subroutine should work in a monochrome program. The colors
- mentioned are the default colors in the pallette.
-
- Low resolution
-
- Color Index Color Pixel Value
- -----------------------------------
- 0 White 0
- 1 Black 15
- 2 Red 1
- 3 Green 2
- 4 Blue 4
- 5 Cyan 6
- 6 Yellow 3
- 7 Magenta 5
- 8 Low White 7
- 9 Grey 8
- 10 Light Red 9
- 11 Light Green 10
- 12 Light Blue 12
- 13 Light Cyan 14
- 14 Light Yellow 11
- 15 Light Magenta 13
-
- Medium Resolution
-
- Color Index Color Pixel Value
- -----------------------------------
- 0 White 0
- 1 Black 3
- 2 Red 1
- 3 Green 2
-
-
- If you have any questions I can be reached through my
- GEnie mail address, J.S.GALLARDO, or in the main message area
- on the Iowa Student Computer Association BBS, 319-335-3331
- 300-2400 baud, as Jose Gallardo.
-